﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Comissoes.Models.NCMModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
    <!-- CSS -->
    <%= ViewData["scripts"] %>
</head>
<body>
    <div class="cabecalho ui-state-highlight">
        <span class="icolst" />
        <span class="txt">
            <%= Html.Encode("Edição de NCM") %>
        </span>
    </div>    
    <form action="javascript:saveDialog('NCM', $('#ID_NCM').val())">
        <fieldset class="container transparent">
            <label class="input160">
                <button class="diskcommand" type="submit"">Salvar</button>
                <% if (Model.ncm.ID_NCM == 0)
                   { %>                    
                    <button class="closecommand" type="button" onclick="loadOption('/NCM/Index', true);">Cancelar</button>
                <% }
                   else
                   { %>
                    <button class="closecommand" type="button" onclick="loadOption('/NCM/Details/<%= Html.Encode(Model.ncm.ID_NCM) %>', true);">Cancelar</button>
                <% } %>
            </label>
        </fieldset>
        <fieldset class="container field520 border ui-widget-content ui-corner-all">
            <% if (Model.ncm.ID_NCM== 0)
               { %>
            <%= Html.Hidden("ID_NCM") %>
            <% } %>
            <% else
               { %>
            <%= Html.Hidden("ID_NCM", Model.ncm.ID_NCM) %>
            <% } %>
            
            <%= Html.Label("COD_NCM", "for80 clear", "Código:") %>
            <%= Html.LabelInput(Html.TextBox("COD_NCM", Model.ncm.COD_NCM), "input80 right setfocus") %>

            <%= Html.Label("ATIVO_NCM", "for200 right", "Ativo") %>
            <label class="space"></label>
            <%= Html.LabelInput(Html.CheckBox("ATIVO_NCM", Model.ncm.ATIVO_NCM == "A" || Model.ncm.ATIVO_NCM == null), "Check") %>

            <%= Html.Label("DESC_NCM", "for80 clear", "Descrição:") %>
            <%= Html.LabelInput(Html.TextBox("DESC_NCM", Model.ncm.DESC_NCM), "input400") %>
        </fieldset>
    </form>
</body>
</html>